package com.example.common.vo;

import lombok.Data;

import java.util.List;

/**
 * 分页响应对象
 * 用于API分页查询的统一响应格式
 * 
 * @author AI Assistant
 * @since 1.0.0
 */
@Data
public class PageResponse<T> {
    
    /**
     * 数据列表
     */
    private List<T> records;
    
    /**
     * 总记录数
     */
    private Long total;
    
    /**
     * 每页大小
     */
    private Long size;
    
    /**
     * 当前页码
     */
    private Long current;
    
    /**
     * 总页数
     */
    private Long pages;
    
    public PageResponse() {}
    
    public PageResponse(List<T> records, Long total, Long size, Long current, Long pages) {
        this.records = records;
        this.total = total;
        this.size = size;
        this.current = current;
        this.pages = pages;
    }
}
